$(function () {
    setTopData()
})
function setTopData() {
    $.getJSON("http://localhost:8080/topfoot",{},function (data) {
        let html = ''
        $.each( data ,function (i ,info) {
            html +='<div onclick="window.location.href= \''+info.href+'\'">'+info.title+'</div>'
        })
        $('#nav').html(html)
    })
}